import React from 'react';
import classNames from 'classnames';
import FileButtonPause from './FileButtonPause';
import FileButtonContinue from './FileButtonContinue';
import FileButtonRemove from './FileButtonRemove';
import FileButtonPreview from './FileButtonPreview';
import FileButtonDownload from './FileButtonDownload';

/**
 * 操作按钮集合，包含了：暂停、续传、删除、预览、下载
 * @param {any} props 
 */
export default function FileActions(props) {
    const {
        listType
    } = props;

    const { className, children, ...otherProps } = props;

    return (
        <div className={classNames([
            'file-actions',
            { [`file-actions--${listType}`]: listType },
            className
        ])}>
            <FileButtonPause {...otherProps} />
            <FileButtonContinue {...otherProps} />
            <FileButtonRemove {...otherProps} />
            <FileButtonPreview {...otherProps} />
            <FileButtonDownload {...otherProps} />
            {children}
        </div>
    );
}